using System.ComponentModel.DataAnnotations;

namespace AiPlatformAdmin.Api.Models;

public class Agent : ITenantEntity
{
    public int Id { get; set; }

    [Required]
    public int TenantId { get; set; }

    [Required]
    [MaxLength(200)]
    public string Name { get; set; } = string.Empty;

    [MaxLength(100)]
    public string? Category { get; set; } // e.g., "Customer Service", "Data Analysis", "Code Assistant"

    [MaxLength(100)]
    public string? Icon { get; set; } // Icon name from icon library (e.g., "RobotOutlined", "CustomerServiceOutlined")

    [Required]
    public string SystemMetaPrompt { get; set; } = string.Empty;

    [MaxLength(1000)]
    public string? WelcomeMessage { get; set; } // Welcome message displayed to users when they start chatting

    public string? PredefinedPrompts { get; set; } // JSON array of predefined prompt suggestions

    [Required]
    [MaxLength(100)]
    public string ModelVersion { get; set; } = string.Empty;

    public bool IsPublic { get; set; } = false;

    public DateTime CreatedAt { get; set; } = DateTime.UtcNow;

    public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;

    // Navigation properties
    public Tenant? Tenant { get; set; }
    public ICollection<AgentKnowledgeBase> AgentKnowledgeBases { get; set; } = new List<AgentKnowledgeBase>();
    public ICollection<AgentPlugin> AgentPlugins { get; set; } = new List<AgentPlugin>();
    public ICollection<TokenUsage> TokenUsages { get; set; } = new List<TokenUsage>();
    public ICollection<AgentAdmin> AgentAdmins { get; set; } = new List<AgentAdmin>();
    public ICollection<AgentTeamAccess> AgentTeamAccesses { get; set; } = new List<AgentTeamAccess>();
}
